﻿using System;
using System.Runtime.Serialization;
using NCMIS.ObjectModel.MetaData;

namespace NCMIS.Produce
{
    /// <summary>
    /// Represents an exception that a repository may return in response to a CMIS service method call.
    /// </summary>
    [DataContract(Name = "cmisFault", Namespace = CmisNs.Cmism)]
    public class Fault
    {
        /// <summary>
        /// The exception type.
        /// </summary>
        [DataMember(Name = "type")]
        public ServiceExceptionType Type
        {
            get;
            set;
        }

        /// <summary>
        /// The exception code.
        /// </summary>
        [DataMember(Name = "code")]
        public string Code
        {
            get;
            set;
        }

        /// <summary>
        /// The exception message.
        /// </summary>
        [DataMember(Name = "message")]
        public string Message
        {
            get;
            set;
        }
    }
}
